import random

print('百家乐')

cards = []
length_card_color = 13
colors = ('spade', 'heart', 'club', 'diamond')


def show_cards():
    print(cards)


def shuffle_cards():
    """
    洗牌并显示洗牌后的数据列表
    """
    random.shuffle(cards)
    show_cards()


def init_cards():
    """
    初始化一副扑克牌，并洗牌一次
    """
    for i in range(len(colors)):
        for j in range(length_card_color):
            cards.append(str(j + 1) + ',' + str(colors[i]))

    shuffle_cards()


def get_card():
    """
    从52张牌中获取一张牌
    """
    return cards[random.randint(0, 51)]


init_cards()
get_card()
print(get_card())
